package com.woyowodaows.request;


import com.google.gson.Gson;

/**
 * @author haiwei
 *         解析数据返回
 *         2017/2/22
 */
public class ApiResponsFactory {

    /**
     * 解析服务器返回数据
     *
     * @param result
     * @return
     */
    public static Object onReponseWithResult(Class<?> clazz, String result) {
        if (result == null) {
            return null;
        }
        try {
            return new Gson().fromJson(result,clazz);
        } catch (Exception e) {
        }
        return null;
    }

}
